// DataSourceManager.cpp: implementation of the DataSourceManager class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "DataSourceManager.h"
#include "RecordsetPtrWrap.h"
#include "ProductCatalog.h"
using namespace DAWrapper;
using namespace JointSystem;

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

const DataSourceItem* DataSourceManager::GetDSItemByPFID( const CString& pfid ) const
{
	for ( int i = 0; i < GetCount(); i++ )
		if ( m_Items.GetAt(i)->m_CurDsi->ItemID() == pfid )
			return m_Items.GetAt(i)->m_CurDsi;
		return 0;
}

const DataSourceManager* DataSourceManager::GetDSMByPFID( const CString& pfid ) const
{
	for( int i = 0; i < GetCount(); i++)
		if(m_Items.GetAt(i)->m_CurDsi->ItemID() == pfid)
			return m_Items.GetAt(i);
	return 0;
}